﻿using PlantsZombies.Common.Zombie;
using System;
using System.Drawing;

namespace PlantsZombies.Common
{
    [PlantZombie( SpeciesType.SupportRodZombie)]
    public unsafe class GameSupportRodZombie : ZombieObject
    {
        public GameSupportRodZombie(ImageObject[] images) : base(images,SpeciesType.OrdinaryZombie, 20, 2,2,new System.Drawing.Size(128, 128))
        {
        }

        protected override void PlayBody(IntPtr hdc)
        {
            var image = _images[_curPlayIndex];
            GDI32.DrawImageTransparenc(hdc, image.BitmapPtr, Location.X - Size.Width / 3, Location.Y - Size.Height / 3, image.Width, image.Height, Size.Width, Size.Height);
            if (++_curPlayIndex >= _images.Length)
                _curPlayIndex = 0;
        }
    }
}
